<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <title>站细管理系统</title>
    <link rel="stylesheet" type="text/css" href="/layuicms/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/css/style.css"/>
    <link rel="stylesheet" href="/layuicms/layui_ext/dtree/dtree.css" media="all"/>
    <link rel="stylesheet" href="/layuicms/layui_ext/dtree/font/dtreefont.css" media="all"/>
    <script type="text/javascript" charset="utf-8" src="/admin/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/admin/ueditor/ueditor.all.js"></script>
    <script type="text/javascript" charset="utf-8" src="/admin/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="/layuicms/layui_ext/dist/dtree.js"></script>
    <style type="text/css">
        .boxs {
            height: 100vh;
            overflow: hidden;
        }
        #edui1_iframeholder {
            overflow: hidden;
        }
        div #layui-layer2 .layui-layer layui-layer-page {
            z-index: 198910161;
        !important;
        }
        #wordexport{height: calc(100vh - 40px); overflow: auto;}
    </style>
</head>

<body style="overflow: hidden;position: relative;">
<div class="boxs">
    <div class="contentBox">
        <div class="contentLeft">
            <!--<blockquote class="layui-elem-quote">
                <a href="javascript:void(0)" id="removeOrg" onclick="closeToEditByZdid()"><i class="icon-x"></i></a>
            </blockquote>-->
            <div class="tree-list" style="overflow: auto;" id="toolbarDiv">
                <span id="2" style="/* display: none; */"><b>文件标题</b></span><br>
                <span id="3" style="/* display: none; */"><b>站名</b></span><br>
                <span id="4" style="/* display: none; */"><b>公司名称</b></span><br>
                <ul id="standFileTree" class="dtree" data-id="0" style="height: auto;"></ul>
            </div>
        </div>
        <form action="" method="post" class="" id="dataFrm" lay-filter="dataFrm">
            <div class="contentRight layui-row">
                <div class="layui-col-md12">
                    <div class="title-area">
                        <a class="print-btn" href="javascript:doprintWord(&quot;docxml/getwordForPDF1/10010&quot;)" onclick="Progress()">文件打印</a>
                    </div>
                    <div id="wordexport">
                        <div id="print">
                            <h3 id="title"></h3>
                            <div id="oldContext">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/frontEnd/js/jquery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/admin/js/FileSaver.js" type="text/javascript" charset="utf-8"></script>
<script src="/admin/js/jquery.wordexport.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/layuicms/layui/layui.js"></script>
<script type="text/javascript" src="/layuicms/layui_ext/dist/dtree.js"></script>
<script type="text/javascript">
    function Progress(){
        $("#wordexport").wordExport();
    }
</script>
<script type="text/javascript">
    layui.extend({
        dtree: '/layuicms/layui_ext/dtree/dtree'   // {/}的意思即代表采用自有路径，即不跟随 base 路径
    }).use(['jquery', 'form', 'layer', 'dtree', 'layedit'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var dtree = layui.dtree;
        var layedit = layui.layedit;
        // var h=$(document).height()-400;
        var standFileTree;
        var form = layui.form;
        /*checkboxStation*/
        var id = $(window.parent.document).find("#editId").val();
        // 初始化树
        standFileTree = dtree.render({
            elem: "#standFileTree",
            dataStyle: "layuiStyle",
            dataFormat: "list",  //配置data的风格为list
            response: {message: "msg", statusCode: 0},
            initLevel: "1",
            icon: "2",
            record: true,
            line: true,
            scroll: "#toolbarDiv",
            url: '/standFineList/loadStandFileManagerLeftJson/' + id // 使用url加载（可与data加载同时存在）
        });
        // 绑定节点点击standId
        var url = "";
        var id = "";
        dtree.on("node('standFileTree')", function (obj) {
            var json = obj.param.recordData;
            var star = JSON.parse(json);//获取对应的value
            id = star.standId;
            $("#nodeId").val(obj.param.nodeId);
            $("#parentId").val(obj.param.parentId);
            $.get("/fileManage/findFileManageById/" + id, function (res) {
                $("#title").html(res.data.item.treeTitle);
                $("#oldContext").html(res.data.item.treeContext);
            })
        });
    });
</script>
</body>
</html>